<!--
 * @Author: GKN
 * @Date: 2023-11-27 10:31:46
 * @LastEditTime: 2024-02-01 10:53:12
 * @LastEditors: GKN
 * @Description: 
 * @FilePath: \mod\src\view\components\card6.vue
 * 可以输入预定的版权声明、个性签名、空行等
-->
<template>
  <div class="card" :style="isBorder?'border-bottom:1px dashed#d6d6d6;':''">
    <div class="items" :style="i % 2 == 0?'':'flex-flow: row-reverse;'">
        <div class="img">
            <imgView :src="url" />
        </div>
        <div class="cont">
            <div>
                <div class="title omit-2">{{ props.title }}</div>
                <div class="desc omit-5">{{ props.desc }}</div>
            </div>
            <div class="more" @click="more">
                查看详情
                <img src="@/assets/img/sjx.png" alt="">
            </div>
        </div>
    </div>
  </div>
</template>

<script setup>
    const props = defineProps({
        i: {
            type: Number,
            default: 0,
        },
        url: {
            type: String,
            default: "",
        },
        title:{
            type: String,
            default: "",
        },
        desc:{
            type: String,
            default: "",
        },
        isBorder:{
            type: blur,
            default: true
        }
    })
    let emit = defineEmits(["more"]);
    const more = () => {
        emit("more");
    };
</script>

<style lang='less' scoped>
.card{
    width:100%;
    
    padding: 20px 0;
    .items{
        display: flex;
        .img{
        width: 40%;
        height: 222px;
        img{
            width: 100%;
            height: 222px;
        }
    }
    .cont{
        width: 60%;
        padding:15px 36px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        .title{
            font-size: 16px;
            text-align: left;
            color: #333;
            font-weight: bold;
        }
        .desc{
            margin-top: 18px;
            font-size: 14px;
            text-align: left;
            color:#8d8d8d ;
            line-height: 26px;
        }
        .more{
            display: flex;
            align-items: center;
            font-size: 14px;
            color: #d10b00;
            cursor: pointer;
            img{
                margin-left: 10px;
            }
        }
    }
    }
    
}
</style>
